
const db = require('./db.js');

module.exports = {
   GetRoleByUserId:async(userId)=>{
       const sql= `SELECT r.* FROM
                    sys_user_role ur LEFT JOIN sys_role r ON ur.role_id = r.role_id 
                    WHERE user_id = ? and del_flag = 0`
       return await db.query(sql,[userId])
   }

}
